﻿package com.crl.module.npc.model.action
{

	/**
	 *  npc队列action 对一个请求,做多个不同操作;
	 * @author crlnet
	 * 
	 */	
	public class QueueAction extends AbstractAction
	{
		private var list:Array;
		public function QueueAction()
		{
			super(null);
			list=new Array();
		}
		
		/**
		 * 加入一个动作,进一个队列; 
		 * @param action
		 * 
		 */		
		public function push(action:IAction):void{
			list.push(action);
		}
		
		override public function execute():void{
			for each(var action:IAction in list){
				action.execute();
			}
		}
	}
}